﻿/* Author : Geeta (A0091320W)*/
/* Dated: 27 January 2012, SA-34*/
 using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BAL.Controller;
using EntityObjects;

namespace PresentationLayer.View.DepartmentEmployee
{
    public partial class EmpReqHisDetails : System.Web.UI.Page
    {
        ViewRequisitionHistoryControl control = new ViewRequisitionHistoryControl();
         protected void Page_Load(object sender, EventArgs e)
        {
            String reqFormId = Request.QueryString["reqFormId"];
            lblDepartmentName.Text = control.getDeptName(Convert.ToInt32(reqFormId));

            Requisition r = control.getRequisitionByReqFormId(Convert.ToInt32(reqFormId));
            String[] dates = r.RequestedDate.Split(' ');
            lblAppliedDate.Text = dates[0].ToString();
            lblStatus.Text = r.Status;

            List<RequisitionItems> list = control.getRequisitionItems(Convert.ToInt32(reqFormId));
            if (list != null)
            {
                ReqDetails.DataSource = list;
                ReqDetails.DataBind();
            }
        }

        protected void ReqDetails_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}